package top.infopub.mgr.cap.dao;

import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import top.infopub.generic.GenericDao;
import top.infopub.mgr.cap.domain.LoanFinDomain;
import top.infopub.mgr.cap.vo.LoanFinVo;
import top.infopub.model.cap.LoanFin;

import java.util.List;

/** 融资放款(CAP_LOAN_FIN) **/
@Repository
public interface LoanFinDao extends GenericDao<LoanFin, String> {

    /**
     * 根据条件查询融资放款记录
     * @param LoanFinVo
     * @return
     * @see
     */
    Page<LoanFinDomain> selectByDomainWhere(LoanFinVo loanFinVo);

    /**
     * 根据条件查询融资放款记录-我审批的
     * @param LoanFinVo
     * @return
     * @see
     */
    Page<LoanFinDomain> selectMyCheckByDomainWhere(LoanFinVo loanFinVo);

    /**
     * 添加-融资放款
     */
    void insertById(LoanFin loanFin);

    /**
     * 根据融资放款id查询详情
     * @param id 主键id
     * @return
     * @see
     */
    LoanFinVo selectById(@Param("id")String id);

    /**
     * 查询融资放款信息
     */
    List<LoanFin> queryAll();

    /**
     * 查询融资放款的项目 -- 且已关联项目公司
     */
    List<LoanFin> queryAllWithOrg();

    /**
     * 根据单据编号和项目编号查询融资放款
     */
	LoanFin selectByProCode(@Param("proCode")String proCode,@Param("codes")String codes);

    void modifyFinInfo(LoanFin loanFin);
}
